<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>员工信息管理系统 - 添加员工</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/css/style.css">
</head>
<body>
<header>
    <div class="header-content">
        <h1>员工信息管理系统</h1>
        <div class="user-info">
            <span>欢迎您，${user.username}</span>
            <a href="${pageContext.request.contextPath}/logout" class="logout-btn">退出登录</a>
        </div>
    </div>
</header>

<nav>
    <ul>
        <li><a href="${pageContext.request.contextPath}/dashboard.jsp">首页</a></li>
        <li><a href="${pageContext.request.contextPath}/employee" class="active">员工管理</a></li>
    </ul>
</nav>

<main>
    <div class="content">
        <div class="content-header">
            <h2>添加员工</h2>
        </div>

        <!-- 添加员工表单 -->
        <div class="form-container">
            <form action="${pageContext.request.contextPath}/employee/save" method="post">
                <div class="form-group">
                    <label for="name">姓名 *</label>
                    <input type="text" id="name" name="name" required>
                </div>
                <div class="form-group">
                    <label for="department">部门 *</label>
                    <input type="text" id="department" name="department" required>
                </div>
                <div class="form-group">
                    <label for="position">职位 *</label>
                    <input type="text" id="position" name="position" required>
                </div>
                <div class="form-group">
                    <label for="salary">薪资 *</label>
                    <input type="number" step="0.01" id="salary" name="salary" required>
                </div>
                <div class="form-group">
                    <label for="email">邮箱 *</label>
                    <input type="email" id="email" name="email" required>
                </div>
                <div class="form-group">
                    <label for="phone">电话 *</label>
                    <input type="text" id="phone" name="phone" required>
                </div>
                <div class="form-group">
                    <label for="hireDate">入职日期 *</label>
                    <input type="date" id="hireDate" name="hireDate" required>
                </div>
                <div class="form-actions">
                    <button type="submit" class="btn-submit">保存</button>
                    <a href="${pageContext.request.contextPath}/employee" class="btn-cancel">取消</a>
                </div>
            </form>
        </div>
    </div>
</main>
</body>
<script src="${pageContext.request.contextPath}/js/script.js"></script>
</html>